home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 January / EnterCD 01_2004.iso / Multimedia / Advanced Effect Maker Freeware Edition 1.0 / aemf10.exe / {app} / templates / flagimage.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2002-11-16  |  3.0 KB  |  101 lines

  1. function render()
  2. {
  3.    i = 1;
  4.    while(i < numframes + 1)
  5.    {
  6.       var nangle;
  7.       pic = stage["p_" + i];
  8.       nangle += waveLength;
  9.       sangle += drift;
  10.       var angle = sangle + nangle;
  11.       var scale = dist * Math.sin(angle);
  12.       if(tama == 1)
  13.       {
  14.          pic._alpha = 100 - (1 + Math.abs(Math.sin(angle)) * i * 2);
  15.       }
  16.       pic._y = scale * optY * (i / numframes) * distorzija;
  17.       pic._xscale = 100 + scale * optXS * (i / numframes) * distorzija;
  18.       pic._yscale = 100 - scale * optYS * (i / numframes) * distorzija;
  19.       pic._height -= i * udaljenostkraja;
  20.       i++;
  21.    }
  22. }
  23. function preset(choice)
  24. {
  25.    _level0.waveLength = choice[0];
  26.    _level0.sangle = choice[1];
  27.    _level0.dist = choice[2];
  28.    _level0.drift = choice[3];
  29.    _level0.picDrift = choice[4];
  30.    _level0.rotate = choice[5];
  31.    _level0.optX = choice[6];
  32.    _level0.optY = choice[7];
  33.    _level0.optXs = choice[8];
  34.    _level0.optYs = choice[9];
  35.    _level0.optR = choice[10];
  36. }
  37. var ap = "<APPLETINFO>\r\nappletname=flagimage\r\nappletfilename=flagimage1.swf\r\ncreated=1037444810670\r\n</APPLETINFO>\r\n<ACTIONSCRIPT>\r\nwidth=200\r\nheight=180\r\ndistorzija=2\r\nstagex=1\r\nstagey=-10\r\nurl=http://www.effectmaker.com/clickpage.html\r\ntarget=_blank\r\nimg=t2003l.jpg\r\nbackgroundcolor=0\r\nuseshading=1\r\nflagt=0\r\nquali=0\r\nuseurl=1\r\n</ACTIONSCRIPT>\r\n<HTML>\r\nwidth=200\r\nheight=180\r\n</HTML>\r\n<GENERATED>\r\nwidth=200\r\nheight=180\r\nimg=t2003l.jpg\r\nimg_GS=7;compressionratio;root.moviearea.pic0.img;0;0\r\nbackgroundcolor=000000\r\n</GENERATED>";
  38. var ts = "-1";
  39. if(today.getTime() < ts && ts < today.getTime() + 172800000 || ts == -1)
  40. {
  41.    activated = "true";
  42. }
  43. else
  44. {
  45.    setProperty("expiredapplet", _X, 10);
  46. }
  47. fscommand("allowscale",false);
  48. _quality = "low";
  49. quali = parseInt("0");
  50. if(quali == 1)
  51. {
  52.    _quality = "medium";
  53. }
  54. pre1 = [-0.154645,0,12.475,0.005125,0,0,0,1,0,0,0];
  55. flagt = parseInt("0");
  56. width = parseInt("200");
  57. height = parseInt("180");
  58. tama = parseInt("1");
  59. distorzija = parseInt("2");
  60. stagey = parseInt("-10");
  61. stagex = parseInt("1");
  62. url = "http://www.effectmaker.com/clickpage.html";
  63. useurl = "1";
  64. target = "_blank";
  65. color = parseInt("0");
  66. if(useurl == 0)
  67. {
  68.    setProperty(button.button, _visible, false);
  69. }
  70. button._x = -5;
  71. button._y = -5;
  72. button._width = width + 10;
  73. button._height = height + 10;
  74. numframes = 50;
  75. udaljenostkraja = 2;
  76. if(flagt == 1)
  77. {
  78.    udaljenostkraja = 10;
  79. }
  80. var stage = _level0.moviearea;
  81. w = stage.pic0.img._width / numframes;
  82. a = stage.pic0.img._x;
  83. stage._x = - w + stagex;
  84. stage._y = stage.pic0.img._height * distorzija / 11 + stagey;
  85. i = 1;
  86. while(i < numframes + 1)
  87. {
  88.    duplicateMovieClip(stage.pic0,"p_" + i,16384 + i);
  89.    pic = stage["p_" + i];
  90.    wx += w;
  91.    pic.img._x = a - wx;
  92.    pic._x = i * w;
  93.    pic._alpha = 100;
  94.    pic.tacka._height = pic.img._height + 10;
  95.    pic.tacka._width = pic.img._width;
  96.    pic.tacka._X = w + 0.1;
  97.    pic.tacka._y = -5;
  98.    i++;
  99. }
  100. preset(_level0.pre1);
  101.